package cn.cons;

import java.util.*;

/**
 * description:
 * author:zcx
 * lenovo
 * 时间：2022.02.12.10.29
 */
public class C1 {
    public static void main(String[] args) {
        //创建集合
        Collection collection=new ArrayList();
        Vector vector=new Vector<>();//线程安全
        collection.add("苹果");
        collection.add("苹果1");
        collection.add("苹果2");
        System.out.println(collection.size());
        System.out.println(collection);
        //删除元素
        collection.remove("苹果");
        System.out.println(collection);
        for(Object obj:collection){
            System.out.println(obj);
        }
        System.out.println(Arrays.stream(collection.toArray()).toList());
    }
    LinkedList list=new LinkedList();//链表

}
